package com.qingzhuge.member.controller;

import com.qingzhuge.common.annotation.ASysLog;
import com.qingzhuge.common.enums.EResourceType;
import com.qingzhuge.controller.BasePkLongController;
import com.qingzhuge.core.annotation.AResource;
import com.qingzhuge.dto.response.ResponseBodyDto;
import com.qingzhuge.member.dto.request.SysThirdAppConfigRequestDto;
import com.qingzhuge.member.dto.response.SysThirdAppConfigResponseDto;
import com.qingzhuge.member.entity.SysThirdAppConfig;
import com.qingzhuge.member.service.ISysThirdAppConfigService;
import com.qingzhuge.utils.PageUtil;
import io.swagger.annotations.Api;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : zero.xiao
 * @description : 第三方应用配置，如微信小程序，支付宝小程序
 * @date :2018/6/8 0008 下午 14:49
 * @modified :
 */
@ASysLog(value = "小程序")
@AResource(name = "小程序", type = EResourceType.menu, catalog = "系统配置")
@Api(tags = "S小程序")
@RestController
@RequestMapping("api/sys/auth/third_app")
public class SysThirdAppConfigController extends BasePkLongController<SysThirdAppConfig, ISysThirdAppConfigService, SysThirdAppConfigRequestDto, SysThirdAppConfigResponseDto> {

    @Override
    public ResponseEntity<ResponseBodyDto<PageUtil<SysThirdAppConfigResponseDto>>> queryPage(@RequestBody(required = false) SysThirdAppConfigRequestDto param) {
        return super.queryPage(param);
    }

    @Override
    public ResponseEntity<ResponseBodyDto<SysThirdAppConfigResponseDto>> get(@PathVariable Long id) {
        return super.get(id);
    }

    @Override
    public ResponseEntity<ResponseBodyDto<SysThirdAppConfigResponseDto>> save(@RequestBody SysThirdAppConfigRequestDto thirdApp) {
        return super.update(thirdApp);
    }

    @Override
    public ResponseEntity<ResponseBodyDto<SysThirdAppConfigResponseDto>> update(@RequestBody SysThirdAppConfigRequestDto thirdApp) {
        return super.update(thirdApp);
    }

    @Override
    public ResponseEntity<ResponseBodyDto<Object>> delete(@PathVariable Long id) {
        return super.delete(id);
    }
}
